package core;

class Widget {
    static private int widgetCount = 0 ;
    public String wName ;
    int wNumber ;

    static synchronized int addWidget(){ widgetCount++ ;
      //  wName = "I am Widget # " + widgetCount ; // cannot reference instance variable from static context
        return widgetCount ;
    }
    public Widget(){
    	  wNumber = addWidget();
    }
}
